//
//  SINAMsgItemTableViewCell.m
//  sinashebao
//
//  Created by  androidlongs on 2017/12/28.
//  Copyright © 2017年  androidlongs. All rights reserved.
//

#import "SINAMsgItemTableViewCell.h"
#import "SINACalendarUtils.h"


@interface  SINAMsgItemTableViewCell()
@property (weak, nonatomic) IBOutlet UILabel *titleLabel;

@property (weak, nonatomic) IBOutlet UILabel *timelabel;
@property (weak, nonatomic) IBOutlet UILabel *msgContent;

@end

@implementation SINAMsgItemTableViewCell

- (void)awakeFromNib {
    [super awakeFromNib];
    //self.titleLabel.font = [UIFont fontWithName:@"TrebuchetMS-Bold" size:16];
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

-(void)setModel:(SINAMsgItemModel *)model{
    _model = model;
    
    self.msgContent.text=model.content;
    
    if (self.cellMsgClickBlock) {
        [[SINAUiviewClickLiserner alloc]viewClickFunction:self.contentView andWithBlick:^(UIView *view) {
            self.cellMsgClickBlock(0,model);
        }];
    }
    
     self.timelabel.text = [NSString stringWithFormat:@"%@",[SINACalendarUtils getDateStringWithTimeStr:model.createtime andFormat:@"yyyy-MM-dd HH:mm"]];
    self.titleLabel.text=model.messagetypename;
    
    
    
}

@end
